<span class="edit-on-github">
  {% capture version %}{% polymer_version_dir %}{% endcapture %}
  {% assign dir = version | replace:'.','_' %}
  {% assign element = site.data.versions[dir].elements[page.element] %}

  {% if element %}
    <!-- example location from _data/elements/core-submenu.json -->
    <!-- components/core-menu/core-submenu.html -->
    {% assign location = element.location | split: '/' %}
    <a href="https://github.com/Polymer/{{location[2]}}/blob/master/{{location[3]}}">Edit on GitHub</a>
  {% else %}
    <a href="https://github.com/Polymer/docs/edit/master/{{page.path}}">Edit on GitHub</a>
  {% endif %}
</span>
<div><!-- intentionally blank --></div>
